<!doctype html>
<html class="h-full" data-theme="light">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>EC Game: {{ slug_1 }}</title>
    <meta name="HandheldFriendly" content="True" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href="/public/css/tailwind.css" rel="stylesheet">
    <link href="/public/css/game.css" rel="stylesheet">
    <link href="/public/css/animate.css" rel="stylesheet">
    <link rel="preconnect" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"
          integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
    <meta name="description" content="A beautiful, online alternative to the popular Exploding Kittens card game (just with chickens)" />
    <link rel="apple-touch-icon" sizes="180x180" href="/public/favicon/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/public/favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/public/favicon/favicon-16x16.png">
    <link rel="manifest" href="/public/favicon/site.webmanifest">
    <link rel="canonical" href="https://chickens.rakerman.com/" />
    <meta name="referrer" content="no-referrer-when-downgrade" />
    <meta property="og:site_name" content="Exploding Chickens" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="Spectate game: {{ slug_3 }}" />
    <meta property="og:description" content="A beautiful, online alternative to the popular Exploding Kittens card game (just with chickens)" />
    <meta property="og:url" content="https://chickens.rakerman.com/" />
    <meta property="og:image" content="https://chickens.rakerman.com/public/home_ui.png" />
    <meta property="og:image:width" content="800" />
    <meta property="og:image:height" content="440" />
    <script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.4.0/dist/confetti.browser.min.js"></script>
</head>
<!-- Exploding Chickens, game page // RAk3rman -->
<body class='flex flex-col h-full anim-scene bg-base-100' x-data="{ sidebar_open: false }" @keydown.window.escape="sidebar_open = false">
{{> banner }}
{{! Navigation bar }}
<nav class="anim-ele anim-ele-fadein">
    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <div class="flex items-center justify-between h-16">
            {{! Exploding Chickens header }}
            <button class="flex items-center" onclick="window.location.href = '/'">
                <div class="flex-shrink-0">
                    <h1 class="h-8 text-3xl text-base-content" style="font-family: Bebas Neue"><a class="text-primary">EXPLODING</a> CHICKENS</h1>
                </div>
            </button>
            {{! Right sidebar actions }}
            <div class="block">
                <div class="ml-4 flex items-center md:ml-6">
                    <span class="relative inline-flex">
                        {{! EC chance & active users }}
                        <div class="text-lg font-bold truncate text-base-content py-2" id="itr_ele_ec_count"></div>
                        <div class="inline-flex items-center -space-x-1 overflow-hidden p-2 hidden sm:block" id="itr_ele_players_top"></div>
                        {{! Slide over button }}
                        <button @click="sidebar_open = true" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-white">
                            <svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
                            </svg>
                        </button>
                        {{! Status ping }}
                        <span class="flex absolute h-2 w-2 top-2 right-2 -mt-1 -mr-1" id="status_ping">
                            <span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-gray-400 opacity-75"></span>
                            <span class="relative inline-flex rounded-full h-2 w-2 bg-gray-500"></span>
                        </span>
                    </span>
                </div>
            </div>
        </div>
    </div>
</nav>
{{! Draw and discard deck }}
<div class="flex flex-col items-center justify-center h-screen mb-28 anim-ele anim-ele-fadein">
    <div class="flex align-top mb-6 lg:mb-10 mt-10">
        <div class="flex flex-wrap justify-center items-center p-2" id="itr_ele_players_center">
            {{! Host player when no one has joined }}
            <div class="block text-center">
                <h1 class="text-base-content font-medium text-sm">
                    Host <span class="animate-pulse inline-flex rounded-full h-1.5 w-1.5 mb-0.5 align-middle bg-base-content"></span>
                </h1>
                <div class="flex flex-col items-center -space-y-3">
                    <img class="h-12 w-12 rounded-full" src="/public/avatars/default.png" alt="">
                    <div class="-space-x-4 rotate-12">
                        <div class="transform inline-block rounded-md bg-gray-500 shadow-md h-5 w-4">
                            <h1 class="text-white text-sm">0</h1>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="flex align-bottom">
        <div class="rounded-xl shadow-lg center-card bg-center bg-contain mx-1 z-0" id="anim_draw" style="position:absolute;background-image: url('/public/cards/card_back.png');"></div>
        <button class="rounded-xl shadow-lg center-card bg-center bg-contain mx-1 z-10 focus:outline-none active:outline-none active:ring-2 active:ring-offset-2 active:ring-offset-base-100 active:ring-base-content" onclick="draw_card()" style="background-image: url('/public/cards/card_back.png');"></button>
        <div id="itr_ele_discard_deck">
            <div class="rounded-xl shadow-lg center-card bg-center bg-contain mx-1 border-dashed border-4 border-neutral">
                <h1 class="text-neutral font-bold flex items-center justify-center center-card-text">Discard Pile</h1>
            </div>
        </div>
    </div>
</div>
{{! Card hand }}
<div class="w-full h-28 text-center py-2 anim-ele anim-ele-fadein">
    <div class="-my-24 overflow-x-auto">
        <div class="align-middle inline-block min-w-full sm:px-0 lg:px-8 pt-6">
            <div class="flex items-center" id="itr_ele_player_hand"></div>
        </div>
    </div>
</div>
{{! Sidebar }}
<div class="fixed inset-0 overflow-hidden z-10 anim-ele anim-ele-fadein" x-show="sidebar_open">
    <div class="absolute inset-0 overflow-hidden" x-show="sidebar_open">
        <div x-show="sidebar_open" x-description="Background overlay, show/hide based on slide-over state." x-transition:enter="ease-in-out duration-500" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-transition:leave="ease-in-out duration-500" x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" class="absolute inset-0 bg-base-200 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
        <section @click.away="sidebar_open = false" class="absolute inset-y-0 right-0 pl-10 max-w-full flex" aria-labelledby="slide-over-heading">
            <div class="relative w-screen max-w-md" x-description="Slide-over panel, show/hide based on slide-over state." x-show="sidebar_open" x-transition:enter="transform transition ease-in-out duration-500 sm:duration-700" x-transition:enter-start="translate-x-full" x-transition:enter-end="translate-x-0" x-transition:leave="transform transition ease-in-out duration-500 sm:duration-700" x-transition:leave-start="translate-x-0" x-transition:leave-end="translate-x-full">
                <div x-description="Close button, show/hide based on slide-over state." x-show="sidebar_open" x-transition:enter="ease-in-out duration-500" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-transition:leave="ease-in-out duration-500" x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" class="absolute top-0 left-0 -ml-8 pt-4 pr-2 flex sm:-ml-10 sm:pr-4">
                    <button @click="sidebar_open = false" class="rounded-md text-gray-300 hover:text-white focus:outline-none focus:ring-2 focus:ring-white">
                        <span class="sr-only">Close panel</span>
                        <svg class="h-6 w-6" x-description="Heroicon name: x" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
                        </svg>
                    </button>
                </div>
                {{! Content }}
                <div class="h-full flex flex-col py-6 bg-base-100 shadow-xl overflow-y-scroll">
                    {{! Construct sidebar using partials }}
                    {{> sbr_header }}
                    {{> sbr_game_widgets }}
                    {{> sbr_players }}
                    {{> sbr_card_packs }}
                    {{> sbr_event_log }}
                    {{> sbr_footer }}
                </div>
            </div>
        </section>
    </div>
</div>
{{! JS scripts }}
<script src="/socket.io/socket.io.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.16.0"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.2.2/cdn.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/theme-change@2.0.2/index.js"></script>
<script src="//embed.typeform.com/next/embed.js"></script>
<script src="/public/js/lscache.js"></script>
<script src="/public/js/moment.js"></script>
<script src="/public/js/game/animation.js"></script>
<script src="/public/js/game/events.js"></script>
<script src="/public/js/game/interface.js"></script>
<script src="/public/js/game/setup.js"></script>
<script src="/public/js/sidebar.js"></script>
<script src="/public/js/elements.js"></script>
<script src="/public/js/banner.js"></script>
<script>check_banner('{{ bnr_tag }}')</script>
</body>
</html>